﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace CalyxCFTestWebHost.RequestHandlers
{
  public class ListBorrowers : Calyx.Communication.Framework.ServerSide.Messaging.RequestHandler<CalyxCFRequestsAndResponses.ListBorrowersI>
  {
    public override Calyx.Communication.Framework.Common.Messaging.Response Handle(CalyxCFRequestsAndResponses.ListBorrowersI request)
    {
      var response = new CalyxCFRequestsAndResponses.ListBorrowersO();
      var theBorrowers = new List<CalyxCFTestEntities.Borrower>();
      theBorrowers.Add( new CalyxCFTestEntities.Borrower()
            {
              FirstName = "Fred",
              LastName = "FirstTimer"
            });
      theBorrowers.Add(new CalyxCFTestEntities.Borrower()
      {
        FirstName = "Mary",
        LastName = "FirstTimer"
      });
      response.MyBorrowers = theBorrowers;
      return response;
    }
  }

}
